// component/findCard/card.js
Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    avatar: {
      type: String,
      value: ''
    },
    alias: {
      type: String,
      value: ''
    },
    createTime: {
      type: String,
      value: ''
    },
    isOnTop: {
      type: String,
      value: ''
    },
    school: {
      type: String,
      value: ''
    },
    title: {
      type: String,
      value: ''
    },
    caption: {
      type: String,
      value: ''
    },
    images: {
      type: Array,
      value: []
    },
    postType:{
      type:Number,
      value:0
    },
    itemType:{
      type:Number,
      value:0
    }
  },

  data: {
    indicatorDots: true,
    autoplay: true,
    interval: 5000,
    duration: 1000,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    //预览图片，放大预览
    preview(event) {
      let currentUrl = event.currentTarget.dataset.url
      wx.previewImage({
        current: currentUrl, // 当前显示图片的http链接
        urls: event.currentTarget.dataset.list // 需要预览的图片http链接列表
      })
    }
  }
})